package com.itheima.common.exception;

import com.itheima.common.exception.enums.ResponseEnum;
import io.swagger.models.auth.In;
import lombok.Data;

@Data
public class NcException extends RuntimeException {

    private Integer status;

    public NcException(Integer status) {
        this.status = status;
    }

    public NcException(ResponseEnum enums){
        super(enums.getMessage());
        this.status = enums.getCode();
    }

    public NcException(Integer status, String message) {
        super(message);
        this.status = status;
    }

    public NcException(Integer status, String message, Throwable cause) {
        super(message, cause);
        this.status = status;
    }
}
